--USE Liberty
--GO
---------------------------------------------------------------------------------------------------
IF (SELECT OBJECT_ID('[DocumentManagement].[GetAllTypesOfDocuments]')) IS NOT NULL
BEGIN
	DROP PROCEDURE [DocumentManagement].[GetAllTypesOfDocuments] 
END
---------------------------------------------------------------------------------------------------
GO

IF (SELECT OBJECT_ID('[DBO].[GetAllTypesOfDocuments]')) IS NOT NULL
BEGIN
	DROP PROCEDURE [DBO].[GetAllTypesOfDocuments] 
END
---------------------------------------------------------------------------------------------------
GO

CREATE PROCEDURE [DocumentManagement].[GetAllTypesOfDocuments]

AS 

---------------------------------------------------------------------------------------------------
--						Liberty
---------------------------------------------------------------------------------------------------
--  Stored Procedure :: GetAllTypesOfDocuments
--                                                                            
---------------------------------------------------------------------------------------------------

SET NOCOUNT ON 

SELECT 	OID,
		Description,
		Version,
		DisplayOrder
FROM dbo.TypesOfDocuments
WHERE Active = 1        
ORDER BY DisplayOrder    

GO

---------------------------------------------------------------------------------------------------
-- Assign appropriate permissions
---------------------------------------------------------------------------------------------------
GRANT EXECUTE ON [DocumentManagement].[GetAllTypesOfDocuments] TO [Liberty_Users]
GO

